import request from "@/utils/request";

// 获取我的待办
export function getFlowTodoCount() {
  return request({
    url: "/api/visualdev/Dashboard/FlowTodoCount",
    method: "get",
  });
}

// 获取通知公告
export function getNotice() {
  return request({
    url: "/api/visualdev/Dashboard/Notice",
    method: "get",
  });
}

// 获取未读邮件
export function getEmail() {
  return request({
    url: "/api/visualdev/Dashboard/Email",
    method: "get",
  });
}

// 获取待办事项
export function getFlowTodo() {
  return request({
    url: "/api/visualdev/Dashboard/FlowTodo",
    method: "get",
  });
}

// 获取我的待办事项
export function getMyFlowTodo() {
  return request({
    url: "/api/visualdev/Dashboard/MyFlowTodo",
    method: "get",
  });
}

/**
 * 获取登录用户信息
 * @param {*} id
 * @returns
 */
export function getLoginUserInfo(id) {
  return request({
    url: `/api/permission/Users/getSimpleInfo/${id}`,
    method: "get",
    params: {
      id
    }
  });
}

/**
 * 获取登录用户信息
 * @param {*} id
 * @returns
 */
// export function getLoginUserInfoNew(id) {
//   return request({
//     url: `/api/permission/Users/extend/getSimpleInfo/${id}`,
//     method: "get",
//     params: {
//       id
//     }
//   });
// }

export function getUserInfo(id) {
  return request({
    url: `/api/permission/Users/extend/getSimpleInfo/${id}`,
    method: "get",
  });
}

// 获取总积分
export function temsChbDetail(id) {
  return request({
    url: `/api/course/TemsChb/detail/${id}`,
    method: "get",
  });
}

// 所有的证书数量
export function getMyCertList(data) {
  return request({
    url: `/api/course/TemsCertUser/getMyCertList`,
    method: "post",
    data
  });
}

